<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./throttle.js"></script>
</head>
<body>
    <input type="button"  id = "btn" value="发送验证码"/>
    <div id="box1">
        <div id="box2">
            content
        </div>
        <table border="10"> 
            <tr><td colspan=2 align="center">团队</td></tr> 
            <tr><td rowspan=2 align="center">姓名</td><td align="center">张三</td></tr>
            <tr><td colspan=2 align="center">李四</td></tr>
        <table>
    </div>
    <script>
        const $ = document.querySelector.bind(document);
        const box1 = $('#box1');
        const box2 = $('#box2');
        
        box1.addEventListener('click', () => {
        console.log('box1 true');
        }, true);
        
        box1.addEventListener('click', () => {
        console.log('box1 false');
        }, false);
        
        box2.addEventListener('click', () => {
        console.log('box2 true');
        }, true);
        
        box2.addEventListener('click', () => {
        console.log('box2 false');
        }, false);
    </script>
    <script>
        const btn = document.getElementById('btn');
        let maxTime = 60
        function fn(){          
            if(maxTime == 0){
                btn.disabled = false;  
                btn.value = '发送验证码'
                maxTime = 60
            }else{
                btn.disabled = true;  
                btn.value = `重新发送(${maxTime})`
                maxTime--
            }    
            setTimeout(fn,1000)               
        }    
        btn.addEventListener("click",fn)
        //页面刷新 cookie
    </script>
</body>
</html>